/**
 * 获取角色列表接口
 */

//引入Q模块
let Q = require('q');
//引入公共函数
let util = require('../../util');

//getAllowServices
let index = function(getData, postData, config, redis, db) {
	let deferred = Q.defer();
	db.select('allowServices', {}).then(function(allowServices) {
		deferred.resolve(allowServices);
	}, function() {
		//获取角色列表失败
		deferred.reject('-0166');
	});
	return deferred.promise;
}

//暴露接口
module.exports = {
	index: index
}